home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / system / interc2.zip / INTERCEP.H < prev    next >
Text File  |  1989-04-11  |  1KB  |  47 lines

  1. /* intercep.h -- header file for intercep.c
  2.  * typedefs, defaults, etc.
  3.  * Ned Konz 8/1/87
  4.  */
  5.  
  6. /* some syntactic sugar */
  7. typedef void interrupt (far *IFP)();    /* pointer to interrupt function */
  8. typedef IFP far *IFPP;            /* and pointer to those */
  9.  
  10. /* structure which makes up list of interrupts to capture */
  11. typedef struct {
  12.     int intnum;        /* which interrupt */
  13.     IFP oldint;    /* old handler */
  14. } Intblock;
  15.  
  16. /* structure which is left on stack after interrupt */
  17. typedef struct {
  18.     IFP ipcs;    /* IP, CS */
  19.     unsigned flags;
  20. } Intpack;
  21.  
  22. /* structure which is pushed onto stack by entry into
  23.  * an interrupt function in Turbo C
  24.  */
  25. typedef struct {
  26.     unsigned bp,  di,  si,  ds,  es, dx;
  27.     union {
  28.         unsigned old[3];    /* actually cx, bx, and ax */
  29.         Intpack new;    /* where we will chain to */
  30.     } ovl;
  31. } Regpack;
  32.  
  33. /* what we record in our memory block about each interrupt */
  34. typedef struct {
  35.     Regpack regs;
  36.     Intpack caller;
  37.     int intnum;
  38. } Swi_info;
  39.  
  40. /* some defaults */
  41. #define MAX_INTS    30    /* maximum number of interrupt vectors */
  42. #define MAX_INTERRUPTS    2500    /* about 64K (arbitrary) */
  43. #define OFILENAME "intercep.out"    /* output file name */
  44.  
  45. #define OFILTER "interpre.exe"    /* output filter name */
  46. #define TFILENAME "interpre.dat"    /* template file name */
  47.